﻿<!--{inc(header.view.html)}-->

<div class="header">    
  
                       <div class="nav">
	                                 <ul id="nav_list">
                                     
                                                 <li><a href="#" class="nav_icon"  target="mainframe">积分列表</a></li>                                     


	                                 </ul>
                       </div>
                
</div>



<div id="content">
                   <h1>积分列表</h1>

                  <div>
                                    <div class="tips_show"><img  src="{$web_view_dir}style/images/light.gif" align="absmiddle" /> <b>提示: </b>
                                                                  <span ></span>
                                    </div>


<style type="text/css">
.search_box {
padding:10px;
vertical-align:middle;
}
.search_box .l {
float:left;
vertical-align:middle;
}
.search_box .r {
float:right;
}
</style>
                                   
<script language="javascript" type="text/javascript">

function ato_roleid_url(url,obj){
	document.location.href = url+"&roleid="+obj.value;
}

</script>                                    
                              
<form  method="post" action="?app=integral&act=index&roleid={$roleid}" >

<div class="search_box">
<div class="l"><img  src="{$web_view_dir}style/images/it_nav.gif" align="middle">
用户组查看: 
<select  onchange="ato_roleid_url('index.php?app=integral&act=index&word={$word}&fieldtype={$fieldtype}',this);" >
<option  class="txtgreen" value="0" selected="selected">全部用户</option>

 <?php foreach((array)$roledata as $_key => $_value ) { ?>
                                           
		<option value="{$_value.value}"   <?php if ($roleid==$_value.value) { ?>selected="selected" <?php } ?>  >{$_value.name}</option>
                
 <?php } ?>

</select>
&nbsp;&nbsp;按
<select  name="fieldtype" >
<option value="user_name" <?php if ($fieldtype=='user_name') { ?>selected="selected" <?php } ?> >用户名</option>
<option value="cao_username" <?php if ($fieldtype=='cao_username') { ?>selected="selected" <?php } ?> >操作员</option>              
</select>
<input type="text" title="多个关键字用空格隔开" value="{$word}" name="word"> <input type="submit" value="搜索" class="buton">
<br/><br/>
</div>
<div class="r">

</div>
</div>
</form>

<div class="clear"></div>



<table width="100%" cellspacing="0" cellpadding="4" border="0" align="center" class="table_style">
<tbody>
<tr>
	<td width="50" class="bold">用户名称</td>
	<td align="center" class="bold">积分总数</td>
	<td width="80" align="center" class="bold">增减积分</td>
	<td width="60%" align="center" class="bold">增减积分原因</td>	
	<td width="100" align="center" class="bold">增减时间</td>
	<td width="50" align="center" class="bold">操作员</td>
</tr>
<form method="post" name="user_form" action="?app=integral&act=index&job=work" onsubmit="dosubmit(this)">
<?php foreach((array)$lw_data as $_key => $_value ) { ?>

<tr  onMouseOut="this.className=''" onMouseOver="this.className='bgcolor'">
	<td>
		<input type="checkbox"  value="{$_value.id}" id="userids" name="checkdata[]">
		{$_value.user_name}
	</td>

	<td align="center">{$_value.totalintegral}</td>
	<td align="center"><?php if ($_value.type==1) { ?>+<?php } else { ?>-<?php } ?>{$_value.integral}</td>	
	<td align="center">{$_value.intro}</td>	
	<td align="center">{$_value.time|dateymdgis}</td>		
	<td align="center"><?php if (empty($_value.cao_username)) { ?>无 <?php } else { ?>{$_value.cao_username} <?php } ?></td>

</tr>

<?php } ?>	
 



<style type="text/css">

.p_bar {
margin-top:5px;
}
.p_info {
border:1px solid #CCCCCC;
margin:0 3px;
padding:3px 5px;
text-align:center;
}
.p_curpage {
border:1px solid #CCCCCC;
color:#FF0000;
font-weight:bold;
margin:0 2px;
padding:3px 5px;
text-align:center;
}

.p_num  {
border:1px solid #CCCCCC;
margin:0 3px;
padding:3px 5px;
text-align:center;
}
.p_redirect {
border:1px solid #CCCCCC;
margin:0 3px;
padding:3px 5px;
text-align:center;
}

a {
color:#003366;
text-decoration:none;
}


</style>

<tr>
	<td colspan="5">
    <div class="p_bar">
    <span class="p_info">Total:&nbsp;<b>{$lw_page.total}</b>&nbsp;&nbsp;共{$lw_page.curr.num}/{$lw_page.totalpage}页</span>
    <a class="p_num" href="{$lw_page.head}">首页</a>
    <a class="p_num" href="{$lw_page.up}">&lt;&lt;</a>
    <a class="p_num" href="{$lw_page.up}">上一页</a>
    <span class="p_curpage">{$lw_page.curr.num}</span>
    <a  class="p_num" href="{$lw_page.down}">下一页</a>
    <a  class="p_num" href="{$lw_page.down}">&gt;&gt;</a>
    <a  class="p_num" href="{$lw_page.foot}">末页</a>    
    
    </div>
    </td>
</tr>

<tr>
	<td class="td_line" colspan="5"><a onClick="reverse_ids();" href="javascript:void(0);">全选/反选</a>&nbsp;&nbsp;<a onClick="cancel_ids();" href="javascript:void(0);">取消选择</a>
		   <input type="hidden" name="jobs" value="0">
	   <input type="button" name="Submit3" value="批量删除" onClick="postdo('del')" class="buton">
        <input type="button" name="Submit2" value="删除一个月前的信息" onclick="postdo('onetime')" class="buton">	   	

        <input type="button" name="Submit2" value="积分全部清零" onclick="postdo('toling')" class="buton">
		
	</td>
</tr>

</form>

<tr>
	<td class="td_line" colspan="5">&nbsp;
	</td>
</tr>

<tr>
	<td class="td_line" colspan="5">
<form  method="post" action="?app=integral&act=addpost" >
<table width="100%" cellspacing="0" cellpadding="4" border="0" align="center" class="table_style">
<tbody>

<tr  onMouseOut="this.className=''" onMouseOver="this.className='bgcolor'">
	<td><font color="#FF0000">积分添加(或减少)</font>:</td>
	<td>  <select name="type"  onChange="form_choose(this.options[this.selectedIndex].value)">
          <option value="1" >特定会员积分</option>
          <option value="2" >多会员积分</option> 
          </select>

</td>
</tr>

<tr id="field_form_1"  style="display:none;"   onMouseOut="this.className=''" onMouseOver="this.className='bgcolor'">
      <td colspan="2">

	  用户名：<input type="text"  value="" name="username" id='username'> 
	  <select name="jiajian" >
          <option value="1" >加</option>
          <option value="0" >减</option> 
      </select>	  	  
	  输入积分：<input type="text"  value="" name="jifeng1"  onKeyUp="value=value.replace(/[^\d]/g,'')"> 
	  <input type="submit" value="提交" class="buton"><br/> <input  type="button" name="Submit" value="查看会员信息" onClick="Checkemail()" style="background-color:#FFFFCC"  class="bg"/>
	   </td>
</tr>
<tr id="field_form_2"  style="display:none;"> 
      <td colspan="2">
	  <select name="huiyuantype" >
          <option value="1" >全部会员加特定积分</option>
          <option value="2" >全部会员减特定积分</option> 
          <option value="3" >全部非普通会员，非系统管理员加特定积分</option>
          <option value="4" >全部非普通会员，非系统管理员减特定积分</option> 
          <option value="5" >全部普通会员加特定积分</option>
          <option value="6" >全部普通会员减特定积分</option> 		  		  
		  
      </select>
	  输入积分：<input type="text"  value="" name="jifeng2"  onKeyUp="value=value.replace(/[^\d]/g,'')"> 
	  加\减积分的原因：<input type="text"  value="" name="content"> 	  
	  <input type="submit" value="提交" class="buton">
	   </td>
</tr>	  

</tbody></table>
</form>	
	</td>
</tr>

</tbody></table>                                  
   
    <SCRIPT LANGUAGE="JavaScript"> 

<!--
function get_obj(obj){
   return document.getElementById(obj);
}
/*
function Checkemail(){
    var name = "_blank";
    var url = "{$site_url}/admin?app=user&act=index&fieldtype=user_name" ;
	var args = [];
	    args[0] = ['word',get_obj('username').value] ;
		
	var tempForm = document.createElement("form");
	tempForm.id="tempForm";
	tempForm.method="post";
	tempForm.action=url;
	tempForm.target=name;
	tempForm.style.display="none";

	for(var i=0; i<args.length; i++){
		var hideInput = document.createElement("input");
		hideInput.type="hidden";
		hideInput.name=args[i][0];
		hideInput.value=args[i][1];
		tempForm.appendChild(hideInput);  
	}
	
	tempForm.attachEvent("onsubmit",function(){ window.open("about:blank",name,"directories=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no"); });
	document.body.appendChild(tempForm);
	tempForm.fireEvent("onsubmit");
	tempForm.submit();
	document.body.removeChild(tempForm);
} 
*/
function   Checkemail()
{
   window.open("{$site_url}/admin?app=user&act=index&fieldtype=user_name&word="+get_obj('username').value, "_blank");
}
function form_choose(t)
{
	if(t=='1')
	{
		get_obj('field_form_1').style.display='';		    
	}else
	{
		get_obj('field_form_1').style.display='none';		    
	}	

	if(t=='2')
	{
		get_obj('field_form_2').style.display='';		    
	}else
	{
		get_obj('field_form_2').style.display='none';		    
	}	




}
form_choose('1');

//-->
</SCRIPT>   
                                   
    <script language="javascript">
function postdo(va){
	document.user_form.action='?app=integral&act='+va+'';
	document.user_form.jobs.value=va;
	document.user_form.submit();
}
	
	
function reverse_ids(){
	for (var i=0;i<document.user_form.userids.length;i++) {
		var ids = document.user_form.userids[i];
		ids.checked = !ids.checked;
	}
}
function cancel_ids(){
	for (var i=0;i<document.user_form.userids.length;i++) {
		var ids = document.user_form.userids[i];
		ids.checked = false;
	}
}
function checkbox(){
	n = document.getElementsByName("checkdata[]");
	var j =0;
	for(i = 0; i < n.length; i++){
		if(n[i].checked){
			j++;
		}
	}
	if(j ==0){
		alert("请选择要移动的用户");
		return false;
	}else{
		return true;
	}
}

function dosubmit(o){
	if(checkbox() != true){
		return false;
	}
/*	if(o.moverole.value ==0){
		alert("请选择目标用户组");
		o.moverole.focus();
		return false;
	}
	if(o.movetype.value ==0){
		alert("请选择目标用户类型");
		o.movetype.focus();
		return false;
	}	*/
}
</script>                               
                                   
                                   
                                 
                                   
                                   
                                   
                                   
                                   
                                   
                                   
                                   
                                   
                                   

                 </div>

</div>



<!--{inc(footer.view.html)}-->